<script type="text/javascript">
/***********************************/
$(document).ready(function(){
         $("#opener_agregarFavoritos").click(function(){$( "#dialog-confirmacion-message" ).dialog("open");});
     
            $( "#dialog-succesful-message" ).hide();
            $( "#dialog-failure-message" ).hide();   
            $( "#dialog-restriction-message" ).hide();
            $( "#dialog-confirmacion-message" ).hide();
            $( "#dialog-again-message" ).hide();
            
         $( "#dialog-succesful-message" ).dialog({
                modal: true,
                autoOpen: false,
                buttons: {
                        Ok: function() {
                            $( this ).dialog( "close" );
                        }
                }
        });
        
        $( "#dialog-failure-message" ).dialog({
                                                modal: true,
                                                autoOpen: false,
                                                buttons: {
                                                        Ok: function() {
                                                            $( this ).dialog( "close" );
                                                        }
                                                }
                                        });
        
        $( "#dialog-restriction-message" ).dialog({
                                                modal: true,
                                                autoOpen: false,
                                                buttons: {
                                                        Ok: function() {
                                                            $( this ).dialog( "close" );
                                                        }
                                                }
                                        }); 
            
        $( "#dialog-again-message" ).dialog({
                                                modal: true,
                                                autoOpen: false,
                                                buttons: {
                                                        Ok: function() {
                                                            $( this ).dialog( "close" );
                                                        }
                                                }
                                        }); 
                                        
        $( "#dialog-confirmacion-message" ).dialog({
                                                modal: true,
                                                autoOpen: false,
                                                buttons: {
                                                        Cancelar: function() {
                                                            $( this ).dialog( "close" );
                                                        },
                                                        Aceptar: function() {
                                                            /**************************/
                                                            $.getJSON("<c:url value='favoritos.html'/>", {accion : "agregarFavoritos", codOpci: $("#codOpci").val() },function(resultado){
                                                            
                                                                      if (resultado == 0) {          
                                                                        
                                                                          $( "#dialog-succesful-message" ).dialog("open");
                                                                        
                                                                      } 
                                                                      if (resultado == 1){
                                                                        
                                                                          $( "#dialog-failure-message" ).dialog("open");
                                                                        
                                                                      }
                                                                       if (resultado == -1){
                                                                        
                                                                          $( "#dialog-restriction-message").dialog("open");
                                                                        
                                                                      }
                                                                      if (resultado == -2){
                                                                        
                                                                          $( "#dialog-again-message").dialog("open");
                                                                        
                                                                      }
                                                               }); 
                                                            /**************************/
                                                            $( this ).dialog( "close" );
                                                        }
                                                        
                                                  }
                                        });
     });
/**********************************/
function abrir() {  
if(!checkDate(document.forms[0].fechadesde)) return false;
if(!checkDate(document.forms[0].fechahasta)) return false;
if(document.forms[0].cargo.value !=""){
if(!(isInteger(document.forms[0].cargo.value))){
    alert("Cargo Inválido");
    document.forms[0].cargo.focus();
   return false;
}}

  winwidth='450';
  winheight='920';
    window.open('about:blank', 'window1', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width='+winwidth+',height='+winheight);   
  
    var action = 'mostrarReporte.do';
    var target = 'window1';
    document.forms[0].target = target;
    document.forms[0].action = action;
    document.forms[0].submit();
    document.forms[0].action = action;
    return true;
   
    }

</script>
<table id="fullheighttable" width="775" cellspacing="0" cellpadding="0" align="center">
    <tr>
    <td align="left" valign="top" class="fondo_contenido padtop16left21">
      <table border="0" cellspacing="0" cellpadding="0" class="verdana11bazul">
      <tr>
        <td height="22" align="left" valign="top" class="verdana11bazul">
		<ul class="navlist2">
		<li>
                      RESUMEN DE OPERACIONES
                    </li>
		</ul></td>
        </tr>
      <tr>
      <td valign="top">
        <OBJECT codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0 width="650" height="450" classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000>
         <PARAM NAME="movie" VALUE="../portalHermes/hermetic/swfs/resumenoperaciones.swf">
         <PARAM NAME="quality" VALUE="best"><PARAM NAME="bgcolor" VALUE="#FFFFFF">
         <PARAM NAME="menu" VALUE="False"><PARAM NAME="wmode" VALUE="transparent">
         <embed src="../portalHermes/hermetic/swfs/resumenoperaciones.swf" wmode="transparent" quality=best bgcolor=#FFFFFF width="650" height="450" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
         </embed>
        </OBJECT>
      </td>
      </tr>
</table>
</td>
</tr>
</table>